The 'switch' statement accomplishes a multiway decision based on comparison of an expression with several alternative constant values. The statements following each 'case' label are executed when the value of the tested expression matches the associated constant. The 'default' label indicates the processing if no match is found.
switch (i)
{
case 0: result = 'a';
break;
case 1: /* "fall through" to processing for case 2 */